package com.mytx.search.service;



import com.alibaba.fastjson.JSONObject;
import com.mytx.common.pojo.CommonResult;
import com.mytx.pojo.Topic;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import java.util.Map;

/**
 * Solr Service
 *
 * @author xubin.
 * @create 2017-05-03
 */


public interface SearchService {
    /**
     * 增
     *
     * @return
     */
    @RequestMapping(value = "/index", method = RequestMethod.POST)
    CommonResult index(@RequestBody Topic body);

    /**
     * 删
     *
     * @param info
     * @return
     */

    @RequestMapping(value = "/delete", method = RequestMethod.DELETE)
    CommonResult delete(@RequestBody Map<String, Object> info);

    /**
     * 改
     *
     * @return
     */
    @RequestMapping(value = "/update", method = RequestMethod.POST)
    CommonResult update(@RequestBody Topic topic);

    /**
     * 查
     *
     * @param id 携带产品 id
     * @return
     */
    @RequestMapping(value = "/get", method = RequestMethod.POST)
    CommonResult get(@RequestBody String id);

    /**
     * 通过用户id查询
     * @param info
     * @return
     */
    @RequestMapping(value = "/searchByUid", method = RequestMethod.POST)
     CommonResult searchByUid(@RequestBody Map<String, Object> info);
}
